package org.example.classtopia.Utils;

import org.example.classtopia.Model.Entity.Comment;
import org.example.classtopia.Model.vo.CommentVO;

public class CommentConverter {

    public static CommentVO toVO(Comment comment) {
        if (comment == null) {
            return null;
        }
        CommentVO vo = new CommentVO();
        vo.setId(comment.getId());
        vo.setPostId(comment.getPostId());
        vo.setUserId(comment.getUserId());
        vo.setContent(comment.getContent());
        // 根据CommentVO的字段补充映射
        // 例如 vo.setCreateTime(comment.getCreateTime());
        return vo;
    }
}

